package org.zachary.creditbusiness.commodityandhouse.entity;

import com.baomidou.mybatisplus.annotation.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

@TableName("house_order") // 指定对应的数据库表名
public class HouseOrder {

    @TableId(type = IdType.AUTO) // 主键自增
    private Integer id; // 订单ID

    @TableField("user_id")
    private Integer userId; // 租赁者ID

    @TableField("house_id")
    private Integer houseId; // 房屋ID
    @TableField("deadline")
    private Timestamp deadline; // 租赁截止日期

    @TableField("start_date")
    private Timestamp startDate; // 租赁开始时间
    private Byte status; // 状态：0.未支付、1.已支付等
    private BigDecimal price; // 总金额

    @TableField("order_time")
    private Timestamp orderTime; // 下单时间

    @TableField("pay_date")
    private Timestamp payDate; // 支付时间
    private Byte promise; // 是否守约：0.守约 1.违约

    @TableField("uuid")
    private String uuid; // 唯一标识符，用于消息队列追踪

    @TableField("overdue_message_sent")
    private Boolean overdueMessageSent; // 逾期消息是否已发送：false-未发送，true-已发送

    // Getter 和 Setter 方法
    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getHouseId() {
        return houseId;
    }

    public void setHouseId(Integer houseId) {
        this.houseId = houseId;
    }

    public Timestamp getDeadline() {
        return deadline;
    }

    public void setDeadline(Timestamp deadline) {
        this.deadline = deadline;
    }

    public Timestamp getStartDate() {
        return startDate;
    }

    public void setStartDate(Timestamp startDate) {
        this.startDate = startDate;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public Timestamp getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(Timestamp orderTime) {
        this.orderTime = orderTime;
    }

    public Timestamp getPayDate() {
        return payDate;
    }

    public void setPayDate(Timestamp payDate) {
        this.payDate = payDate;
    }

    public Byte getPromise() {
        return promise;
    }

    public void setPromise(Byte promise) {
        this.promise = promise;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    public Boolean getOverdueMessageSent() {
        return overdueMessageSent;
    }

    public void setOverdueMessageSent(Boolean overdueMessageSent) {
        this.overdueMessageSent = overdueMessageSent;
    }

    @Override
    public String toString() {
        return "HouseOrder{" +
                "id=" + id +
                ", userId=" + userId +
                ", houseId=" + houseId +
                ", deadline=" + deadline +
                ", startDate=" + startDate +
                ", status=" + status +
                ", price=" + price +
                ", orderTime=" + orderTime +
                ", payDate=" + payDate +
                ", promise=" + promise +
                ", uuid='" + uuid + '\'' +
                ", overdueMessageSent=" + overdueMessageSent +
                '}';
    }
}
